/* 
 * com.ctvit.framework.interceptor.LogExceptionInteceptor.java Create on Apr 22, 2008 11:20:24 AM By Q-Wang 
 * $Header: /home/cvsroot/ctvit/messgeCenter/src/com/ctvit/framework/interceptor/ExceptionInteceptor.java,v 1.1 2015/12/18 01:15:48 yushihao Exp $
 */
package com.ctvit.framework.interceptor;

import org.aopalliance.intercept.MethodInterceptor;
import org.aopalliance.intercept.MethodInvocation;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

/**
 * @author Q-Wang
 * 
 */
public class ExceptionInteceptor implements MethodInterceptor {

	private static final Log log = LogFactory
			.getLog(ExceptionInteceptor.class);

	/**
	 * @see org.aopalliance.intercept.MethodInterceptor#invoke(org.aopalliance.intercept.MethodInvocation)
	 */
	public Object invoke(MethodInvocation invocation) throws Throwable {
		try {
			return invocation.proceed();
		} catch (Exception e) {
			log.error("Error Occur:", e);
			throw e;
		}
	}

}
